﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using University.Workshop.Presenters.Cistern.Read;

namespace University.Workshop.Presentation.Cistern.Read
{
    /// <summary>
    /// Interaction logic for PageFirstStepReadCisternView.xaml
    /// </summary>
    public partial class PageFirstStepReadCisternView : Page, Presenters.Cistern.Read.IFirstStepReadCistern
    {
        PresenterReadCistern pInternal;
       Presenters.Cistern.Read.PresenterReadFirstStep pReadFirstStep;
        public PageFirstStepReadCisternView(Presenters.Cistern.Read.PresenterReadCistern pExternal)
        {
            InitializeComponent();
            pInternal = pExternal;
            pReadFirstStep = new Presenters.Cistern.Read.PresenterReadFirstStep(this);
        }

        public string PersonId
        {
            get
            {
                return CiLbl.Content.ToString();
            }
            set
            {
                CiLbl.Content = value;
            }
        }

        public string PersonNames
        {
            get
            {
                return NamesLbl.Content.ToString();
            }
            set
            {
                NamesLbl.Content = value;
            }
        }

        public string PersonLastNames
        {
            get
            {
                return LastNamesLbl.Content.ToString();
            }
            set
            {
                LastNamesLbl.Content = value;
            }
        }


        public List<string> PersonPhones
        {
            set 
            {
                PhoneLst.ItemsSource = value;
            }
        }

        public void Update()
        {
            pReadFirstStep.UpdateData();
        }

        public void GoNextPage()
        {

        }

        public void GoBackPage()
        {
            pInternal.GoStepOne();
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            App.Current.MainWindow.Title = "Ver Persona";
        }

        public Model.Cistern CisternToRead
        {
            get;
            set;
        }
    }
}
